<template>
    <div class="vita-content" :class="{'swiper-container': enableSwiper}" v-el:swiper> 
      <div class="swiper-wrapper">
        <slot></slot>
      </div>
    </div>
</template>

<script>

  require('../scss/libs/swiper.css')
  import Swiper from 'swiper'

  export default {

    props: ['enableSwiper'],

    data() {
      return {
        swiper: Object,
        subContents: []
      }
    },

    methods: {
      registerSubContent(subContent) {
        this.subContents.push(subContent)
      }
    },

    ready() {
      if (this.enableSwiper) {
        this.$nextTick(()=>{
          this.swiper = new Swiper(this.$els.swiper, {touchRatio: .8});
        })
      }
    }

  }
</script>

<style lang='sass'>
  
</style>